
<div class="col-sm-12 ml10">
	<!-- BOX -->
	<div class="box content-color nopadding-vertical nopadding-left ">
		<div class="box-body">
			<div class="row">
				<div class="panel-box shadow">
					<div class="col-xs-12 nopadding-left">
						<p class="user-add-btn">
							{{#if detailEdit}}
							{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='保存' clickAction="savePlan" savePlan="savePlan"}}
							{{/ui/mix-button}}
							{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消' clickAction="detailCancel" detailCancel="detailCancel"  }}
							{{/ui/mix-button}}
							{{else}}
							{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-edit"  text='编辑' clickAction="detailEditClick" detailEditClick="detailEditClick" clickActParams=evaInfo }}
							{{/ui/mix-button}}
							{{#ui/mix-button class="user-btn trash-btn" iconClass="fa fa-trash-o"  text='删除' clickAction="delPlan" delPlan="delPlan"}}
							{{/ui/mix-button}}
							{{/if}}
						</p>
					</div>

					<div class="col-xs-12 mt20 nopadding-left">
						<div class="col-sm-5 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon">模板标题：</span>
								{{#if detailEdit}}
								{{callbusi/busi-form-element class="full-width" placeholder="模板标题(必填)"
								model=evaInfo property="title"}}
								{{else}}
								<div class="input-group-content">{{evaInfo.title}}</div>
								{{/if}}
							</div>

						</div>
						<div class="col-sm-6 pull-right">
							<div class="form-input-group">
								<span class="input-group-addon">评估方式：</span>
								{{#if detailEdit}}
								{{callbusi/dict-selector class="inline-block" curDict=evaInfo.type groupCode=constants.evaluateType
								showName=evaInfo.type.typename dictSelect="evaluateTypeSelect" value=evaInfo.type preselected=true}}
								{{else}}
								<div class="input-group-content">{{evaInfo.type.typename}}</div>
								{{/if}}
							</div>

						</div>
						<div class="col-sm-12 nopadding-left">
							<div class="form-input-group">
								<span class="input-group-addon">备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</span>
								{{#if detailEdit}}
								{{#if id}}
								{{textarea type="text" class="full-width inline-block form-input-group label-normal form-control" value=evaInfo.remark}}
								{{else}}
								{{textarea type="text" class="full-width inline-block form-input-group label-normal form-control" value=evaInfo.remark placeholder='备注'}}
								{{/if}}
								{{else}}
								<div class="input-group-content">{{evaInfo.remark}}</div>
								{{/if}}
							</div>

						</div>
					</div>

				</div>
				<div class=" col-sm-12 nopadding-left nopadding-right question-box">
					<div class="box nopadding-left nopadding-right nopadding-vertical border blue shadow">
						<div class="box-title">
							<div class="title">评估模板问题</div>
							{{#if detailEdit}}
							<div class="col-sm-3 func-area nopadding-right nopadding-vertical pull-right">
								<div class="user-add-btn col-sm-3 pull-right nopadding-right nopadding-vertical">
									{{#ui/mix-button class="user-btn pull-right" iconClass="fa-plus"  text='添加新问题' clickAction="toAddQuestion" toAddQuestion="toAddQuestion"}}
									{{/ui/mix-button}}
								</div>
							</div>
							{{/if}}
						</div>
						<div class="box-body overflow-hidden fullWidth">

							<div class="list-content panel-group">
								{{#each sortQuestionList as |question index|}}
								<div class="panel panel-default col-sm-12 nopadding-left nopadding-right">
									<div class="panel-heading nopadding-vertical nopadding-horizontal">
										{{#callbusi/question-list-item detailEdit=detailEdit
											question=question seq=index selectAction="chooseQuestion"
											hasSelected=question.hasSelected chooseQuestion=(action "chooseQuestion" question index)
											delAction="delQuestion" delQuestion=(action "delQuestion" question)
											saveNewQuestion='saveNewQuestion' saveNewQuestion=(action "saveNewQuestion" question)
											toAddAnswer="toAddAnswer" toAddAnswer=(action "toAddAnswer")
											upOrder="upOrder" upOrder=(action "upOrder" question index)
										}}
										{{/callbusi/question-list-item}}
									</div>
									<div class="panel-collapse">
										{{#if question.hasSelected}}


										{{#if curQuestion}}
										{{#each answerList  as |answer index|}}
										<div class="list-item border-top col-sm-12 nopadding-left pointer hover-bk nopadding-right {{if answer.hasSelected 'selected-area' ''}}"
										{{action "selectAnswer" answer on="mouseEnter"}}>
										<div class="form-input-group lighter left4 col-sm-12 nopadding-right nopadding-left answer-box">
											{{#if detailEdit}}
											<div class="input-group-content col-sm-12 full-width	">
												{{ui/editable-area content=answer.content busiType="content" seq=index commitAction=(action "saveAnswer") delAnswer=(action "delAnswer" answer) detailEdit=detailEdit hasSelected=answer.hasSelected}}
											</div>
											<!-- {{#if answer.hasSelected}}
											<div class="part-func col-sm-1 pull-right text-right del-icon" {{action "delAnswer" answer on="click"}}>
												<i class="fa-minus-circle"></i>
											</div>
											{{/if}} -->
											{{else}}
											<div class="input-group-content">
												{{ui/editable-area content=answer.content busiType="content" seq=index commitAction=(action "saveAnswer") detailEdit=detailEdit}}
											</div>
											{{/if}}
										</div>
										{{#if score}}
										<div class="form-input-group lighter top8 left4">
											<span class="input-group-addon">分数：</span>
											{{#if detailEdit}}
											<div class="input-group-content width-auto">
												{{ui/editable-area content=answer.score busiType="content" commitAction=(action "saveAnswer") detailEdit=detailEdit hasSelected=answer.hasSelected}}
											</div>
											{{else}}
											<div class="input-group-content">{{answer.score}}</div>
											{{/if}}
										</div>
										{{else}}
										<div class="form-input-group lighter top8 left4">
											<span class="input-group-addon">护理项目：</span>
												{{#each answer.services as |service|}}
													<div class="square-item" >
													  <div class="text" >{{service.name}}</div>
													</div>
												{{/each}}
												{{#if detailEdit}}
												{{#if answer.hasSelected}}
												<div class="square-item answer-icon" {{action "changeService" on="click"}}>
													<div class="text" ><i class="fa-plus"></i></div>
												</div>
												{{/if}}
												{{/if}}

										</div>
										{{/if}}
									</div>
									{{/each}}
									{{/if}}

									{{/if}}
								</div>
							</div>
							{{/each}}
						</div>
					</div>
				</div>

			</div>
		</div>
	</div>
</div>
<!-- /BOX -->
</div>

<!--修改护理项目弹层-->
{{#if serviceChangeModal}}
{{#bs-modal body=false footer=false header=false}}
{{#bs-modal-header}}
<h4 class="modal-title">编辑护理项目：</h4>
{{/bs-modal-header}}
{{#bs-modal-body}}
{{callbusi/eva-services serviceList=allServiceList curAnswer=curAnswer text1='已选护理项目' text2='所有护理项目'}}
{{/bs-modal-body}}
{{#bs-modal-footer class="user-add-btn"}}
{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-save"  text='确定' clickAction="saveNewService" saveNewService="saveNewService"}}
{{/ui/mix-button}}
{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-undo"  text='取消'  clickAction="invitation" invitation="invitation"}}
{{/ui/mix-button}}
{{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}

<!--删除问卷弹层-->
{{#if delEvaModal}}
{{#bs-modal body=false footer=false header=false}}
{{#bs-modal-header}}
<h3 class="modal-title">删除提示</h3>
{{/bs-modal-header}}
{{#bs-modal-body}}
<h4 class="modal-title">是否删除该条记录？</h4>
{{/bs-modal-body}}

{{#bs-modal-footer as |footer|}}
{{#bs-button action=(action "cancelPassSubmit" evaInfo) type="primary" disabled=prepaidDisabled}}确定{{/bs-button}}
{{#bs-button action=(action "invitation") type="default"}}取消{{/bs-button}}
{{/bs-modal-footer}}
{{/bs-modal}}
{{/if}}
